window.onload=function(){
	
		
				//运维人员业绩分类切换
				var perfor=document.getElementsByClassName("perfor")[0];
				var starcomplain=document.getElementsByClassName("starcomplain")[0];
				var oper_perf_table=$("oper_perf_table");
				var oper_star_table=$("oper_star_table");
				
				perfor.onclick=function(){
					 styleDisplayBlock(oper_perf_table);
					 styleDisplaynone(oper_star_table);
				};
				
				starcomplain.onclick=function(){
					styleDisplaynone(oper_perf_table);
					styleDisplayBlock(oper_star_table);
				};
				
				
				//工单统计报表分类切换
				var department=document.getElementsByClassName("department")[0];
				var fault=document.getElementsByClassName("fault")[0];
				var department_table=$("department_table");
				var fault_table=$("fault_table");
				
				department.onclick=function(){
					 styleDisplayBlock(department_table);
					styleDisplaynone(fault_table);
				};
				fault.onclick=function(){
					styleDisplaynone(department_table);
					 styleDisplayBlock(fault_table);
				};
				
				
				//左边切换右边
				//获取左边li元素
				var complainli=$("complainli");
				var createli=$("createli");
				var ordermanageli=$("ordermanageli");
				var faultli=$("faultli");
				var totalorderli=$("totalorderli");
				var performancesli=$("performancesli");
				var websiteli=$("websiteli");
				
				//获取右边各个div
				
				
								//左边切换菜单
								var operationdiv=$("operation");
				var operationLi=operationdiv.getElementsByTagName("li");
				var turndivs=document.getElementsByClassName("turndiv");
				//console.log("turndivs---------"+turndivs);
				for (var i=0;i<operationLi.length;i++) {
					operationLi[i].index=i;
						operationLi[i].onclick=function(){
							//console.log("index--------"+this.index);
							for (var j=0;j<operationLi.length;j++) {
								operationLi[j].className="";
								turndivs[j].style.display='none';
							}
							this.className="active";
							
							turndivs[this.index].style.display='block';
					}
						
				}
				
				
	function $(id){
		return document.getElementById(id);
	}
	function styleDisplayBlock(ele){//点击元素显示
		return ele.style.display="block";
	}
	function styleDisplaynone(ele){//点击元素隐藏
		return ele.style.display="none";
	}
	
	
	//工单管理和投诉管理的已完成和未完成切换
	
	qiehuan("all");
	qiehuan("all2");

};


function qiehuan(id){
	var nowUl = document.getElementById(id);
	var nowLi = nowUl.getElementsByTagName("li");
	for(var i = 0; i < nowLi.length; i++) {
		nowLi[i].onclick = function() {
			for(var j = 0; j < nowLi.length; j++) {
				nowLi[j].className = "";
			}
			this.className = "now";

		}

	}

}
//以下是点击出现弹框增加故障分类的js代码
function addKind(){
    document.getElementById("addKind").style.display="block";
}
function closeBox(){
    document.getElementById("addKind").style.display="none";
}
